package com.example.shop.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.CarEntity
import com.example.shop.R
import com.example.shop.utils.GlideUtils

class PayedOrderAdapter(list: MutableList<CarEntity>):BaseQuickAdapter<CarEntity,BaseViewHolder>(R.layout.item_order_payed,list) {
    override fun convert(holder: BaseViewHolder, item: CarEntity) {

        holder.setText(R.id.order_desc,item.goods_desc)
        holder.setText(R.id.order_count,"X ${item.count}")
        //显示合计金额
        holder.setText(R.id.order_price,"${item.count*item.goods_default_price}元")
        GlideUtils.loadImage(context,item.goods_default_icon,holder.getView(R.id.order_iv))
    }
}